package cn.izeno.wx.models.mp

import com.alibaba.fastjson.annotation.JSONField

class JsTicket {
  var ticket: String = ""


  /**
   * 过期13位时间戳
   */
  @field:JSONField(name = "expires_in")
  var expiredAt: Long = 0
    set(value) {
      field = when {
        value in 1..7200 -> System.currentTimeMillis() + value * 1000
        else -> value
      }
    }
}